1. Field of the Invention
The present invention relates to an image compression method for improving the compression factor of a binary bit map image, a decompression method thereof and a program therefor and in particular relates to an image compression method that performs blank skipping in the horizontal and vertical directions, a decompression method thereof and a program therefor.
2. Description of the Related Art
With increasing use of high image resolutions in recent years, data compression techniques are being employed for transmission and storage of binary bit map images. Conventional methods of compression of binary bit map images that have been proposed include MH (modified Huffman), MR (Modified READ), MMR (Modified Modified READ) and JBIG (Joint Bi-level Image Group); these are widely used for storage of files and/or FAX, etc.
With these compression methods, the encoding processing required in order to raise the compression rate is complicated so that time is required for processing of a high-resolution image. Bit map data compression methods aimed at speeding up the rate of processing have therefore been proposed (for example Laid-open Japanese Patent Application number H. 8-51545).
FIG. 15 shows a diagram of such a prior art image compression method. As shown in FIG. 15, first of all an input image A is scanned in the horizontal (main scanning) direction in units of a prescribed number of lines K (for example single line units), and continuous blank lines as between rows in units of a prescribed number of lines L (for example units of 8 lines) are encoded as a vertical skip and non-blank line regions are separated as logical rows B.
Next, the separated logical rows B is scanned in the vertical (auxiliary scanning) direction in single-column units, and regions containing black pixels of non-blank regions are separated by horizontal skipping of blank regions, such as for example between letters, that do not contain black pixels.
Then, in each logical row, regions consisting solely of white pixels (blank regions) and regions consisting solely of black pixels are encoded so as to be skipped by designating their respective column numbers. Next, regions C and E having continuous columns of the same pixel value are encoded using this pixel value and the number of such repetitions. In regions D other than those containing black pixels, the pixel data in this region are output as encoded data without modification together with the column numbers.
Such a method of compression is suitable for high-speed data compression of text documents, in which there are a comparatively large number of blanks.
In the bit map data compression method described above, as shown in FIG. 15, among regions C, D and E other than those containing black pixels, the regions C and E having a fixed height (pixel value) in the auxiliary scanning direction are compressed by encoding with this height (pixel value) and column number. However, the regions D in which the pixel values are changing smoothly such as for example the outline portions of the letters cannot be compressed with the conventional method of compressing solely the portions where the same pixel columns are continuous, since the pixel values are changing; the image data must therefore be output without modification: there was therefore the problem requiring improvement that the image compression factor needed to be raised.